<?php $this->pageTitle = __('Register an account', true); ?>
<?php
	echo $javascript->link('cake-ticker', false);
	echo $javascript->link(Configure::read('jquery.version'), false);
	echo $javascript->link(Configure::read('jquery.version'), false);
	echo $javascript->link(Configure::read('jquery.validate.version'), false);
	echo $javascript->link('views/users/register', false);
?>
<?php echo __('Register a new account');?> <br /><br />

<?php echo $form->create('User', array('action'=>'register')) ?>

      <?php echo $form->input('username', array(
      	'label' =>__('Username', true),
        'error' => array(
            'required' => __('Please enter an alpha numeric username.', true),
            'alphaNumeric' => __('Please enter an alpha numeric username.', true), 
            'maxLength' => __('Username is too long. Maximum length is 50 characters.', true),
            'isUnique' => __('Sorry that username is in use.', true)
            ), 
            'MAXLENGTH' => ' 50' )); ?>
            
      <?php echo $form->input('email', array(
      	'label' =>__('Email', true),
        'error' => array(
            'required' => __('Please enter a valid email address.', true),
            'isEmail' => __('Please enter a valid email address.', true)
        ))
        ); ?>

	<?php echo $form->input('confirmEmail', array(
		'label' =>__('Confirm Email', true),
        'error' => array(
            'required' => __('Please enter a valid email address.', true),
            'isEmail' => __('Please enter a valid email address.', true)
        ))
        ); ?>
      
      <?php echo $form->input('password', array(
      	'label' =>__('Password', true),
        'error' => array(
            'required' => __('Please enter a password.', true),
            'isPasswordComplex' => __('Password is too simple. Minimum length is 5 characters, 1 Uppercase character and 1 number.', true),
            'confirmPassword' => __('Passwords do not match.', true)
            ), 'value' => ''
        ) 
        ); ?>

      <?php echo $form->input('confirmPassword', array(
      		'label' =>__('Confirm Password', true),
            'error' => array(
                'required' => __('Please enter a password.', true),
                'isPasswordComplex' => __('Password is too simple. Minimum length is 5 characters, 1 Uppercase character and 1 number.', true),
                'confirmPassword' => __('Passwords do not match.', true)
            ), 'type' => 'password', 'value' => '') ); ?>

<br />
<?php echo $form->end(__('Register', true)); ?>